\(\int \frac {(a^2+2 a b x+b^2 x^2)^2}{d+e x} \, dx\) [1470]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 26, antiderivative size = 98 \[ \int \frac {\left (a^2+2 a b x+b^2 x^2\right )^2}{d+e x} \, dx=-\frac {b (b d-a e)^3 x}{e^4}+\frac {(b d-a e)^2 (a+b x)^2}{2 e^3}-\frac {(b d-a e) (a+b x)^3}{3 e^2}+\frac {(a+b x)^4}{4 e}+\frac {(b d-a e)^4 \log (d+e x)}{e^5} \]

[Out]

-b*(-a*e+b*d)^3*x/e^4+1/2*(-a*e+b*d)^2*(b*x+a)^2/e^3-1/3*(-a*e+b*d)*(b*x+a)^3/e^2+1/4*(b*x+a)^4/e+(-a*e+b*d)^4
*ln(e*x+d)/e^5

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {27, 45} \[ \int \frac {\left (a^2+2 a b x+b^2 x^2\right )^2}{d+e x} \, dx=\frac {(b d-a e)^4 \log (d+e x)}{e^5}-\frac {b x (b d-a e)^3}{e^4}+\frac {(a+b x)^2 (b d-a e)^2}{2 e^3}-\frac {(a+b x)^3 (b d-a e)}{3 e^2}+\frac {(a+b x)^4}{4 e} \]

[In]

Int[(a^2 + 2*a*b*x + b^2*x^2)^2/(d + e*x),x]

[Out]

-((b*(b*d - a*e)^3*x)/e^4) + ((b*d - a*e)^2*(a + b*x)^2)/(2*e^3) - ((b*d - a*e)*(a + b*x)^3)/(3*e^2) + (a + b*
x)^4/(4*e) + ((b*d - a*e)^4*Log[d + e*x])/e^5

Rule 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps \begin{align*} \text {integral}& = \int \frac {(a+b x)^4}{d+e x} \, dx \\ & = \int \left (-\frac {b (b d-a e)^3}{e^4}+\frac {b (b d-a e)^2 (a+b x)}{e^3}-\frac {b (b d-a e) (a+b x)^2}{e^2}+\frac {b (a+b x)^3}{e}+\frac {(-b d+a e)^4}{e^4 (d+e x)}\right ) \, dx \\ & = -\frac {b (b d-a e)^3 x}{e^4}+\frac {(b d-a e)^2 (a+b x)^2}{2 e^3}-\frac {(b d-a e) (a+b x)^3}{3 e^2}+\frac {(a+b x)^4}{4 e}+\frac {(b d-a e)^4 \log (d+e x)}{e^5} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.17 \[ \int \frac {\left (a^2+2 a b x+b^2 x^2\right )^2}{d+e x} \, dx=\frac {b e x \left (48 a^3 e^3+36 a^2 b e^2 (-2 d+e x)+8 a b^2 e \left (6 d^2-3 d e x+2 e^2 x^2\right )+b^3 \left (-12 d^3+6 d^2 e x-4 d e^2 x^2+3 e^3 x^3\right )\right )+12 (b d-a e)^4 \log (d+e x)}{12 e^5} \]

[In]

Integrate[(a^2 + 2*a*b*x + b^2*x^2)^2/(d + e*x),x]

[Out]

(b*e*x*(48*a^3*e^3 + 36*a^2*b*e^2*(-2*d + e*x) + 8*a*b^2*e*(6*d^2 - 3*d*e*x + 2*e^2*x^2) + b^3*(-12*d^3 + 6*d^
2*e*x - 4*d*e^2*x^2 + 3*e^3*x^3)) + 12*(b*d - a*e)^4*Log[d + e*x])/(12*e^5)

Maple [A] (verified)

Time = 2.57 (sec) , antiderivative size = 168, normalized size of antiderivative = 1.71

method result size
norman \(\frac {b \left (4 a^{3} e^{3}-6 a^{2} b d \,e^{2}+4 a \,b^{2} d^{2} e -b^{3} d^{3}\right ) x}{e^{4}}+\frac {b^{4} x^{4}}{4 e}+\frac {b^{2} \left (6 a^{2} e^{2}-4 a b d e +b^{2} d^{2}\right ) x^{2}}{2 e^{3}}+\frac {b^{3} \left (4 a e -b d \right ) x^{3}}{3 e^{2}}+\frac {\left (e^{4} a^{4}-4 b \,e^{3} d \,a^{3}+6 b^{2} e^{2} d^{2} a^{2}-4 a \,b^{3} d^{3} e +b^{4} d^{4}\right ) \ln \left (e x +d \right )}{e^{5}}\) \(168\)
default \(\frac {b \left (\frac {b^{3} x^{4} e^{3}}{4}+\frac {\left (\left (2 a e -b d \right ) b^{2} e^{2}+2 b^{2} e^{3} a \right ) x^{3}}{3}+\frac {\left (2 \left (2 a e -b d \right ) a b \,e^{2}+b e \left (2 a^{2} e^{2}-2 a b d e +b^{2} d^{2}\right )\right ) x^{2}}{2}+\left (2 a e -b d \right ) \left (2 a^{2} e^{2}-2 a b d e +b^{2} d^{2}\right ) x \right )}{e^{4}}+\frac {\left (e^{4} a^{4}-4 b \,e^{3} d \,a^{3}+6 b^{2} e^{2} d^{2} a^{2}-4 a \,b^{3} d^{3} e +b^{4} d^{4}\right ) \ln \left (e x +d \right )}{e^{5}}\) \(189\)
risch \(\frac {b^{4} x^{4}}{4 e}+\frac {4 b^{3} x^{3} a}{3 e}-\frac {b^{4} x^{3} d}{3 e^{2}}+\frac {3 b^{2} x^{2} a^{2}}{e}-\frac {2 b^{3} x^{2} a d}{e^{2}}+\frac {b^{4} x^{2} d^{2}}{2 e^{3}}+\frac {4 b \,a^{3} x}{e}-\frac {6 b^{2} a^{2} d x}{e^{2}}+\frac {4 b^{3} a \,d^{2} x}{e^{3}}-\frac {b^{4} d^{3} x}{e^{4}}+\frac {\ln \left (e x +d \right ) a^{4}}{e}-\frac {4 \ln \left (e x +d \right ) b d \,a^{3}}{e^{2}}+\frac {6 \ln \left (e x +d \right ) b^{2} d^{2} a^{2}}{e^{3}}-\frac {4 \ln \left (e x +d \right ) a \,b^{3} d^{3}}{e^{4}}+\frac {\ln \left (e x +d \right ) b^{4} d^{4}}{e^{5}}\) \(209\)
parallelrisch \(\frac {3 b^{4} x^{4} e^{4}+16 x^{3} a \,b^{3} e^{4}-4 x^{3} b^{4} d \,e^{3}+36 x^{2} a^{2} b^{2} e^{4}-24 x^{2} a \,b^{3} d \,e^{3}+6 x^{2} b^{4} d^{2} e^{2}+12 \ln \left (e x +d \right ) a^{4} e^{4}-48 \ln \left (e x +d \right ) a^{3} b d \,e^{3}+72 \ln \left (e x +d \right ) a^{2} b^{2} d^{2} e^{2}-48 \ln \left (e x +d \right ) a \,b^{3} d^{3} e +12 \ln \left (e x +d \right ) b^{4} d^{4}+48 x \,a^{3} b \,e^{4}-72 x \,a^{2} b^{2} d \,e^{3}+48 x a \,b^{3} d^{2} e^{2}-12 x \,b^{4} d^{3} e}{12 e^{5}}\) \(209\)

[In]

int((b^2*x^2+2*a*b*x+a^2)^2/(e*x+d),x,method=_RETURNVERBOSE)

[Out]

b*(4*a^3*e^3-6*a^2*b*d*e^2+4*a*b^2*d^2*e-b^3*d^3)/e^4*x+1/4/e*b^4*x^4+1/2*b^2/e^3*(6*a^2*e^2-4*a*b*d*e+b^2*d^2
)*x^2+1/3/e^2*b^3*(4*a*e-b*d)*x^3+(a^4*e^4-4*a^3*b*d*e^3+6*a^2*b^2*d^2*e^2-4*a*b^3*d^3*e+b^4*d^4)/e^5*ln(e*x+d
)

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 179, normalized size of antiderivative = 1.83 \[ \int \frac {\left (a^2+2 a b x+b^2 x^2\right )^2}{d+e x} \, dx=\frac {3 \, b^{4} e^{4} x^{4} - 4 \, {\left (b^{4} d e^{3} - 4 \, a b^{3} e^{4}\right )} x^{3} + 6 \, {\left (b^{4} d^{2} e^{2} - 4 \, a b^{3} d e^{3} + 6 \, a^{2} b^{2} e^{4}\right )} x^{2} - 12 \, {\left (b^{4} d^{3} e - 4 \, a b^{3} d^{2} e^{2} + 6 \, a^{2} b^{2} d e^{3} - 4 \, a^{3} b e^{4}\right )} x + 12 \, {\left (b^{4} d^{4} - 4 \, a b^{3} d^{3} e + 6 \, a^{2} b^{2} d^{2} e^{2} - 4 \, a^{3} b d e^{3} + a^{4} e^{4}\right )} \log \left (e x + d\right )}{12 \, e^{5}} \]

[In]

integrate((b^2*x^2+2*a*b*x+a^2)^2/(e*x+d),x, algorithm="fricas")

[Out]

1/12*(3*b^4*e^4*x^4 - 4*(b^4*d*e^3 - 4*a*b^3*e^4)*x^3 + 6*(b^4*d^2*e^2 - 4*a*b^3*d*e^3 + 6*a^2*b^2*e^4)*x^2 -
12*(b^4*d^3*e - 4*a*b^3*d^2*e^2 + 6*a^2*b^2*d*e^3 - 4*a^3*b*e^4)*x + 12*(b^4*d^4 - 4*a*b^3*d^3*e + 6*a^2*b^2*d
^2*e^2 - 4*a^3*b*d*e^3 + a^4*e^4)*log(e*x + d))/e^5

Sympy [A] (verification not implemented)

Time = 0.22 (sec) , antiderivative size = 136, normalized size of antiderivative = 1.39 \[ \int \frac {\left (a^2+2 a b x+b^2 x^2\right )^2}{d+e x} \, dx=\frac {b^{4} x^{4}}{4 e} + x^{3} \cdot \left (\frac {4 a b^{3}}{3 e} - \frac {b^{4} d}{3 e^{2}}\right ) + x^{2} \cdot \left (\frac {3 a^{2} b^{2}}{e} - \frac {2 a b^{3} d}{e^{2}} + \frac {b^{4} d^{2}}{2 e^{3}}\right ) + x \left (\frac {4 a^{3} b}{e} - \frac {6 a^{2} b^{2} d}{e^{2}} + \frac {4 a b^{3} d^{2}}{e^{3}} - \frac {b^{4} d^{3}}{e^{4}}\right ) + \frac {\left (a e - b d\right )^{4} \log {\left (d + e x \right )}}{e^{5}} \]

[In]

integrate((b**2*x**2+2*a*b*x+a**2)**2/(e*x+d),x)

[Out]

b**4*x**4/(4*e) + x**3*(4*a*b**3/(3*e) - b**4*d/(3*e**2)) + x**2*(3*a**2*b**2/e - 2*a*b**3*d/e**2 + b**4*d**2/
(2*e**3)) + x*(4*a**3*b/e - 6*a**2*b**2*d/e**2 + 4*a*b**3*d**2/e**3 - b**4*d**3/e**4) + (a*e - b*d)**4*log(d +
 e*x)/e**5

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 177, normalized size of antiderivative = 1.81 \[ \int \frac {\left (a^2+2 a b x+b^2 x^2\right )^2}{d+e x} \, dx=\frac {3 \, b^{4} e^{3} x^{4} - 4 \, {\left (b^{4} d e^{2} - 4 \, a b^{3} e^{3}\right )} x^{3} + 6 \, {\left (b^{4} d^{2} e - 4 \, a b^{3} d e^{2} + 6 \, a^{2} b^{2} e^{3}\right )} x^{2} - 12 \, {\left (b^{4} d^{3} - 4 \, a b^{3} d^{2} e + 6 \, a^{2} b^{2} d e^{2} - 4 \, a^{3} b e^{3}\right )} x}{12 \, e^{4}} + \frac {{\left (b^{4} d^{4} - 4 \, a b^{3} d^{3} e + 6 \, a^{2} b^{2} d^{2} e^{2} - 4 \, a^{3} b d e^{3} + a^{4} e^{4}\right )} \log \left (e x + d\right )}{e^{5}} \]

[In]

integrate((b^2*x^2+2*a*b*x+a^2)^2/(e*x+d),x, algorithm="maxima")

[Out]

1/12*(3*b^4*e^3*x^4 - 4*(b^4*d*e^2 - 4*a*b^3*e^3)*x^3 + 6*(b^4*d^2*e - 4*a*b^3*d*e^2 + 6*a^2*b^2*e^3)*x^2 - 12
*(b^4*d^3 - 4*a*b^3*d^2*e + 6*a^2*b^2*d*e^2 - 4*a^3*b*e^3)*x)/e^4 + (b^4*d^4 - 4*a*b^3*d^3*e + 6*a^2*b^2*d^2*e
^2 - 4*a^3*b*d*e^3 + a^4*e^4)*log(e*x + d)/e^5

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 184, normalized size of antiderivative = 1.88 \[ \int \frac {\left (a^2+2 a b x+b^2 x^2\right )^2}{d+e x} \, dx=\frac {3 \, b^{4} e^{3} x^{4} - 4 \, b^{4} d e^{2} x^{3} + 16 \, a b^{3} e^{3} x^{3} + 6 \, b^{4} d^{2} e x^{2} - 24 \, a b^{3} d e^{2} x^{2} + 36 \, a^{2} b^{2} e^{3} x^{2} - 12 \, b^{4} d^{3} x + 48 \, a b^{3} d^{2} e x - 72 \, a^{2} b^{2} d e^{2} x + 48 \, a^{3} b e^{3} x}{12 \, e^{4}} + \frac {{\left (b^{4} d^{4} - 4 \, a b^{3} d^{3} e + 6 \, a^{2} b^{2} d^{2} e^{2} - 4 \, a^{3} b d e^{3} + a^{4} e^{4}\right )} \log \left ({\left | e x + d \right |}\right )}{e^{5}} \]

[In]

integrate((b^2*x^2+2*a*b*x+a^2)^2/(e*x+d),x, algorithm="giac")

[Out]

1/12*(3*b^4*e^3*x^4 - 4*b^4*d*e^2*x^3 + 16*a*b^3*e^3*x^3 + 6*b^4*d^2*e*x^2 - 24*a*b^3*d*e^2*x^2 + 36*a^2*b^2*e
^3*x^2 - 12*b^4*d^3*x + 48*a*b^3*d^2*e*x - 72*a^2*b^2*d*e^2*x + 48*a^3*b*e^3*x)/e^4 + (b^4*d^4 - 4*a*b^3*d^3*e
 + 6*a^2*b^2*d^2*e^2 - 4*a^3*b*d*e^3 + a^4*e^4)*log(abs(e*x + d))/e^5

Mupad [B] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 189, normalized size of antiderivative = 1.93 \[ \int \frac {\left (a^2+2 a b x+b^2 x^2\right )^2}{d+e x} \, dx=x^3\,\left (\frac {4\,a\,b^3}{3\,e}-\frac {b^4\,d}{3\,e^2}\right )+x\,\left (\frac {d\,\left (\frac {d\,\left (\frac {4\,a\,b^3}{e}-\frac {b^4\,d}{e^2}\right )}{e}-\frac {6\,a^2\,b^2}{e}\right )}{e}+\frac {4\,a^3\,b}{e}\right )-x^2\,\left (\frac {d\,\left (\frac {4\,a\,b^3}{e}-\frac {b^4\,d}{e^2}\right )}{2\,e}-\frac {3\,a^2\,b^2}{e}\right )+\frac {\ln \left (d+e\,x\right )\,\left (a^4\,e^4-4\,a^3\,b\,d\,e^3+6\,a^2\,b^2\,d^2\,e^2-4\,a\,b^3\,d^3\,e+b^4\,d^4\right )}{e^5}+\frac {b^4\,x^4}{4\,e} \]

[In]

int((a^2 + b^2*x^2 + 2*a*b*x)^2/(d + e*x),x)

[Out]

x^3*((4*a*b^3)/(3*e) - (b^4*d)/(3*e^2)) + x*((d*((d*((4*a*b^3)/e - (b^4*d)/e^2))/e - (6*a^2*b^2)/e))/e + (4*a^
3*b)/e) - x^2*((d*((4*a*b^3)/e - (b^4*d)/e^2))/(2*e) - (3*a^2*b^2)/e) + (log(d + e*x)*(a^4*e^4 + b^4*d^4 + 6*a
^2*b^2*d^2*e^2 - 4*a*b^3*d^3*e - 4*a^3*b*d*e^3))/e^5 + (b^4*x^4)/(4*e)